/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package index;

/**
 *
 * @author Nuf
 */
import java.io.*;
import java.util.*;

import java.util.List;
import java.util.Iterator;

public class StopList {

    private static ArrayList<String> stopListArray;

    public StopList(String stopListPath) {
        stopListArray = new ArrayList<String>();
        fillStopList(stopListPath);
    }

    public ArrayList<String> getStopListArray(){
        return stopListArray;
    }


    private static void fillStopList(String stopListFile) {
        try {
            InputStream flux = new FileInputStream(stopListFile);
            InputStreamReader lecture = new InputStreamReader(flux, "ISO-8859-15");
            BufferedReader buff = new BufferedReader(lecture);
            String ligne;
            while ((ligne = buff.readLine()) != null) {
                stopListArray.add(ligne);
            }
            buff.close();

        } catch (Exception e) {
            System.out.println(e.toString());
        }

        //stop list array filling
        Iterator<String> it = stopListArray.iterator();

    }

}
